# -- coding:utf-8 --
import time
class Helper:
   isWaiting = False

   #数字输入辅助方法
   def inputNum2(type=int,content=''):
     data = input(content)
     try:
       inputData = type(data)
       return inputData
     except:
      #pass
      return -1

   #数字输入辅助方法
   @staticmethod
   def inputNum():
     data = input('')
     try:
       inputData = int(data)
       return inputData
     except:
      #pass
      return -1

   #数字输入辅助方法
   def FixValue(val,max,min):
     if(val > max):
         return max
     if(val < min):
         return min
     return val


   def Wait(self,isTrue):   
      lastWait = self.isWaiting
      self.isWaiting = isTrue
      if(isTrue and lastWait == False):
            while(self.isWaiting):
               time.sleep(1)

   